import { Routes, Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-side-menu',
  templateUrl: './side-menu.page.html',
  styleUrls: ['./side-menu.page.scss']
})
export class SideMenuPage implements OnInit {
  public appPages = [
    {
      title: 'Home',
      url: '/home',
      icon: 'home',
    },
    {
      title: 'List',
      url: '/list',
      icon: 'list',
    }
  ];
  constructor(  private router: Router) {}

  ngOnInit() {
    this.isEnableSplit = this.appPages.length > 0 ? true : false;
  }
  isEnableSplit: boolean=true;
  isEnableSplitSpane(): boolean {
    return this.isEnableSplit;
  }

  onLogin() {
    // this.navCtrl.navigateForward('/login');
    // this.navCtrl.navigateRoot('/login');
    this.router.navigateByUrl('/login');
    //this.navCtrl.goBack(bootstrap);
  }
}
